        #ip13-chat-bubble {
            position: fixed;
            z-index: 999990;
            right: 20px;
            bottom: 20px;

            display: flex;
            align-items: center;
            justify-content: center;

            width: 58px;
            height: 58px;
            border: none;
            border-radius: 50%;
            cursor: pointer;

            background: linear-gradient(135deg, #2547d6, #d946ef);
            color: #fff;
            box-shadow: 0 6px 18px rgba(0, 0, 0, .25);

            transition: transform .15s ease, box-shadow .15s ease;
        }

        #ip13-chat-bubble: hover,
        #ip13-chat-bubble:focus-visible {
            transform: scale(1.08);
            box-shadow: 0 8px 22px rgba(0, 0, 0, .32);
        }

        #ip13-chat-badge {
            position: absolute;
            top: -4px;
            right: -4px;

            min-width: 22px;
            height: 22px;
            padding: 0 5px;
            border-radius: 999px;
            border: 2px solid #151515;

            background: #ef4444;
            color: #fff;
            font-size: .72rem;
            font-weight: 800;
            line-height: 18px;
            text-align: center;

            box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
        }

        #ip13-chat-badge[hidden] {
            display: none;
        }

        #ip13-chat-panel {
            position: fixed;
            z-index: 999991;
            right: 20px;
            bottom: 90px;

            display: flex;
            flex-direction: column;

            width: min(360px, calc(100vw - 32px));
            height: min(480px, calc(100vh - 140px));

            background: #151515;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 16px 44px rgba(0, 0, 0, .28);
        }

        #ip13-chat-panel[hidden] {
            display: none;
        }

        #ip13-chat-header {
            display: flex;
            align-items: center;
            justify-content: space-between;

            padding: 14px 16px;

            background: linear-gradient(135deg, #2547d6, #d946ef);
            color: #fff;
            font-weight: 700;
            font-size: .95rem;
        }

        #ip13-chat-header-actions {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        #ip13-chat-collapse,
        #ip13-chat-close {
            background: none;
            border: none;
            color: #151515;
            font-size: 1rem;
            line-height: 1;
            cursor: pointer;
            padding: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 6px;
        }

        #ip13-chat-collapse: hover,
        #ip13-chat-close:hover {
            background: rgba(255, 255, 255, .18);
        }

        #ip13-chat-collapse {
            display: none;
        }

        .ip13-chat-msg-meta {
            font-size: .7rem;
            margin-top: 3px;
            opacity: .7;
        }

        .ip13-chat-msg--visitor .ip13-chat-msg-meta {
            text-align: right;
            color: #e9defc;
        }

        .ip13-chat-msg--admin .ip13-chat-msg-meta {
            color: #9a94a8;
        }

        #ip13-chat-messages {
            flex: 1;
            overflow-y: auto;
            padding: 14px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            background: #f7f5fb;
        }

        .ip13-chat-msg {
            max-width: 82%;
            padding: 9px 12px;
            border-radius: 12px;
            font-size: .88rem;
            line-height: 1.4;
            white-space: pre-wrap;
            word-break: break-word;
        }

        .ip13-chat-msg--visitor {
            align-self: flex-end;
            background: #2547d6;
            color: #fff;
            border-bottom-right-radius: 4px;
        }

        .ip13-chat-msg--admin {
            align-self: flex-start;
            background: #151515;
            color: #ffffff;
            border: 1px solid #eef1f7;
            border-bottom-left-radius: 4px;
        }

        .ip13-chat-choices {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-top: 10px;
        }

        .ip13-chat-choice-btn {
            border: 1px solid #2547d6;
            background: #151515;
            color: #2547d6;
            border-radius: 999px;
            padding: 7px 13px;
            font-size: .82rem;
            font-weight: 600;
            cursor: pointer;
            transition: background .15s ease, color .15s ease;
        }

        .ip13-chat-choice-btn: hover {
            background: #2547d6;
            color: #fff;
        }

        .ip13-chat-choice-btn: disabled {
            opacity: .45;
            cursor: default;
            background: #151515;
            color: #2547d6;
        }

        .ip13-chat-typing {
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 12px 14px !important;
        }

        .ip13-chat-typing span {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: #b7aecb;
            animation: ip13-chat-typing-bounce 1.2s infinite ease-in-out;
        }

        .ip13-chat-typing span: nth-child(2) { animation-delay: .15s; }
        .ip13-chat-typing span: nth-child(3) { animation-delay: .3s; }

        @keyframes ip13-chat-typing-bounce {
            0%, 60%, 100% { transform: translateY(0); opacity: .5; }
            30% { transform: translateY(-4px); opacity: 1; }
        }

        @media (prefers-reduced-motion: reduce) {
            .ip13-chat-typing span { animation: none; opacity: .8; }
        }

        #ip13-chat-messages: empty::before {
            content: "Posez votre question, on vous répond dès que possible.";
            color: #857f92;
            font-size: .85rem;
        }

        #ip13-chat-form {
            border-top: 1px solid #eee;
            padding: 10px;
            background: #151515;
        }

        #ip13-chat-name {
            width: 100%;
            box-sizing: border-box;
            border: 1px solid #eef1f7;
            border-radius: 8px;
            padding: 7px 10px;
            font-size: .8rem;
            margin-bottom: 8px;
        }

        #ip13-chat-input-row {
            display: flex;
            gap: 8px;
            align-items: flex-end;
        }

        #ip13-chat-input {
            flex: 1;
            resize: none;
            max-height: 90px;
            border: 1px solid #eef1f7;
            border-radius: 10px;
            padding: 9px 11px;
            font-size: .88rem;
            font-family: inherit;
            box-sizing: border-box;
        }

        #ip13-chat-attach, #ip13-chat-file-remove {
            border: 1px solid #eef1f7; background: #f5f0ff; color: #6227b9; border-radius: 10px;
            cursor: pointer; flex-shrink: 0; min-width: 38px; min-height: 38px; padding: 5px;
        }
        #ip13-chat-file-selection { font-size: 13px; color: #4c2876; overflow-wrap: anywhere; margin-bottom: 6px; }
        #ip13-chat-file-selection[hidden], #ip13-chat-file[hidden] { display: none !important; }
        #ip13-chat-file-help { color: #666; font-size: 12px; margin-top: 5px; }
        #ip13-chat-status { font-size: 13px; color: #b42318; margin-top: 4px; overflow-wrap: anywhere; }
        #ip13-chat-input { min-width: 0; }
        .ip13-chat-file-link { display: block; color: inherit !important; text-decoration: underline; overflow-wrap: anywhere; margin-top: 6px; }
        .ip13-chat-file-preview { display: block; max-width: 100%; width: auto; max-height: 200px; object-fit: contain; border-radius: 8px; margin-top: 6px; }
        #ip13-chat-send {
            flex-shrink: 0;
            width: 38px;
            height: 38px;
            border: none;
            border-radius: 10px;
            background: #2547d6;
            color: #fff;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        #ip13-chat-send: disabled {
            opacity: .5;
            cursor: default;
        }

        @media (max-width: 480px) {
            #ip13-chat-bubble {
                right: 14px;
                bottom: 14px;
                width: 52px;
                height: 52px;
            }
        }

        /*
         * Plein écran sur mobile ET tablette plutôt qu'une petite fenêtre
         * flottante : évite le bug classique iOS/Android où un panneau
         * position:fixed ancré depuis le BAS (bottom:Npx) se retrouve mal
         * placé (voire hors écran, en-tête compris) quand le clavier
         * s'ouvre, puisque le clavier ne modifie pas la hauteur de la
         * fenêtre "layout" mais seulement la zone visible. Ancré depuis le
         * HAUT (top:0), la hauteur réelle est ensuite ajustée en JS via
         * window.visualViewport pour tenir exactement au-dessus du clavier.
         * 1024px couvre les téléphones ET les tablettes (iPad compris, y
         * compris en orientation paysage).
         */
        @media (max-width: 1024px) {
            #ip13-chat-panel {
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                width: 100%;
                height: 100dvh;
                max-width: none;
                border-radius: 0;
            }

            #ip13-chat-collapse {
                display: flex;
            }
        }
