/* ==========================================================================
   Chatbot Front-End Styles - Premium & Dynamic
   ========================================================================== */

#anthem-ai-chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Bulle Flottante (Bubble) - Cachée, remplacée par le teaser */
#anthem-ai-chat-bubble {
    display: none;
}

#anthem-ai-chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    animation: none;
}

#anthem-ai-chat-bubble.offline {
    filter: grayscale(0.6);
}

#anthem-ai-chat-bubble.offline::after {
    content: "";
    position: absolute;
    top: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    background: #ef4444;
    border: 2px solid white;
    border-radius: 50%;
}

/* Mini-bulle de teaser avec typing indicator */
#anthem-ai-chat-teaser {
    position: absolute;
    bottom: 24px;
    right: 0;
    background: linear-gradient(135deg, var(--anthem-ai-teaser-gradient-start, #2563EB) 0%, var(--anthem-ai-teaser-gradient-end, #3b82f6) 100%);
    padding: 10px;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    display: flex;
    align-items: center;
    gap: 0;
    cursor: pointer;
    animation: anthemAiTeaserSlide 0.5s ease-out 2s both;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

#anthem-ai-chat-teaser:hover {
    width: auto;
    padding: 10px 16px 10px 10px;
    gap: 10px;
    border-radius: 50px;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.4);
}

#anthem-ai-chat-widget.anthem-ai-open #anthem-ai-chat-teaser {
    display: none;
}

.anthem-ai-teaser-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.anthem-ai-teaser-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.anthem-ai-teaser-icon svg {
    color: white;
}

.anthem-ai-teaser-text {
    font-size: 14px;
    font-weight: 500;
    color: white;
    white-space: nowrap;
    flex-shrink: 0;
    opacity: 0;
    width: 0;
    transition: opacity 0.3s ease, width 0.3s ease;
}

#anthem-ai-chat-teaser:hover .anthem-ai-teaser-text {
    opacity: 1;
    width: auto;
}

.anthem-ai-typing-indicator {
    display: flex;
    gap: 4px;
    align-items: center;
    opacity: 0;
    width: 0;
    transition: opacity 0.3s ease, width 0.3s ease;
}

#anthem-ai-chat-teaser:hover .anthem-ai-typing-indicator {
    opacity: 1;
    width: auto;
}

.anthem-ai-typing-indicator span {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: anthemAiTyping 1.4s infinite ease-in-out;
}

.anthem-ai-typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

.anthem-ai-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.anthem-ai-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes anthemAiTeaserSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes anthemAiTyping {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* Animation Micro-Interaction: Pulse */
.pulse-effect {
    animation: anthemAiPulse 2s infinite;
}

@keyframes anthemAiPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 99, 235, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

/* Animation discrète de pulsation */
@keyframes anthemAiDiscretePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18), 0 0 0 8px rgba(37, 99, 235, 0.1);
    }
}

/* Fenêtre de Chat Principale */
#anthem-ai-chat-window {
    position: absolute;
    bottom: 90px;
    right: 0;
    width: 360px;
    height: 600px;
    max-height: calc(100vh - 120px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, visibility 0.4s;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9) translateY(20px);
}

#anthem-ai-chat-widget.anthem-ai-open #anthem-ai-chat-window {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}

/* ── Mode Modal (Plein écran) ────────────────────────── */
#anthem-ai-chat-widget.anthem-ai-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999999;
}

#anthem-ai-chat-widget.anthem-ai-modal #anthem-ai-chat-bubble {
    display: none !important;
}

#anthem-ai-chat-widget.anthem-ai-modal #anthem-ai-chat-window {
    position: relative;
    bottom: auto;
    right: auto;
    width: 90%;
    max-width: 800px;
    height: 80vh;
    max-height: 800px;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

#anthem-ai-chat-widget.anthem-ai-open #anthem-ai-chat-bubble {
    display: none;
    /* Remplacer par une animation de fermeture de bulle si voulu */
}

/* Header */
.anthem-ai-chat-header {
    background: linear-gradient(135deg, var(--anthem-ai-primary-color), color-mix(in srgb, var(--anthem-ai-primary-color) 80%, black));
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.anthem-ai-chat-bot-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.anthem-ai-chat-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#anthem-ai-chat-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

#anthem-ai-chat-close {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background 0.2s ease;
}

#anthem-ai-chat-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

.anthem-ai-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

#anthem-ai-chat-human {
    color: white;
    padding: 6px;
    border-radius: 50%;
    transition: background 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#anthem-ai-chat-human:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Zone des Messages */
#anthem-ai-chat-messages {
    flex: 1;
    padding: 20px;
    padding-bottom: 60px; /* Espace pour le feedback bar */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f9fafb;
    scroll-behavior: smooth;
}

/* Styliser la scrollbar */
#anthem-ai-chat-messages::-webkit-scrollbar {
    width: 6px;
}

#anthem-ai-chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* Message Styles */
.anthem-ai-msg-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
    animation: anthemAiFadeIn 0.3s ease forwards;
    opacity: 0;
    transform: translateY(10px);
}

.anthem-ai-msg-wrapper.bot {
    align-self: flex-start;
}

.anthem-ai-msg-wrapper.user {
    align-self: flex-end;
    justify-content: flex-end;
}

/* Conteneur pour message + suggestions (alignement vertical) */
.anthem-ai-msg-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    min-width: 0;
}

.anthem-ai-msg-avatar {
    width: 28px;
    height: 28px;
    background: #e2e8f0;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #64748b;
}

.anthem-ai-msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.anthem-ai-msg-avatar svg {
    width: 16px;
    height: 16px;
}

.anthem-ai-msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

@keyframes anthemAiFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.anthem-ai-msg.bot {
    background: white;
    color: #1f2937;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #f3f4f6;
}

.anthem-ai-msg.bot.streaming::after {
    content: "●";
    display: inline-block;
    margin-left: 4px;
    font-size: 10px;
    color: var(--anthem-ai-primary-color);
    animation: anthemAiBlink 1s step-end infinite;
    vertical-align: middle;
}

@keyframes anthemAiBlink {

    0%,
    100% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}

.anthem-ai-msg.user {
    background: var(--anthem-ai-primary-color);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(var(--anthem-ai-primary-color), 0.2);
}

/* Formatage Markdown des réponses du Bot (Titres, listes, code...) */
.anthem-ai-msg.bot p {
    margin: 0 0 10px 0;
}

.anthem-ai-msg.bot p:last-child {
    margin-bottom: 0;
}

.anthem-ai-msg.bot h1,
.anthem-ai-msg.bot h2,
.anthem-ai-msg.bot h3,
.anthem-ai-msg.bot h4 {
    margin: 16px 0 8px 0;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
}

.anthem-ai-msg.bot h1:first-child,
.anthem-ai-msg.bot h2:first-child,
.anthem-ai-msg.bot h3:first-child,
.anthem-ai-msg.bot h4:first-child {
    margin-top: 0;
}

.anthem-ai-msg.bot h3,
.anthem-ai-msg.bot h4 {
    font-size: 1.1em;
}

.anthem-ai-msg.bot h2 {
    font-size: 1.25em;
}

.anthem-ai-msg.bot h1 {
    font-size: 1.4em;
}

.anthem-ai-msg.bot ul,
.anthem-ai-msg.bot ol {
    margin: 8px 0 12px 20px;
    padding: 0;
}

.anthem-ai-msg.bot li {
    margin-bottom: 6px;
}

.anthem-ai-msg.bot a {
    color: var(--anthem-ai-primary-color);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
}

.anthem-ai-msg.bot a:hover {
    text-decoration: none;
}

.anthem-ai-msg.bot strong {
    font-weight: 600;
    color: #0f172a;
}

.anthem-ai-msg.bot code {
    background: #f1f5f9;
    padding: 2px 4px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9em;
    color: #0f172a;
}

.anthem-ai-msg.bot pre {
    background: #1e293b;
    color: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.85em;
    margin: 10px 0;
}

.anthem-ai-msg.bot pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.anthem-ai-msg.bot blockquote {
    border-left: 4px solid var(--anthem-ai-primary-color);
    margin: 10px 0;
    padding-left: 12px;
    color: #475569;
    font-style: italic;
}

/* Zone de Saisie */
.anthem-ai-chat-input-area {
    padding: 16px;
    background: white;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

#anthem-ai-chat-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    outline: none;
    max-height: 100px;
    background: #f8fafc;
    transition: all 0.2s ease;
}

#anthem-ai-chat-input:focus {
    background: white;
    border-color: var(--anthem-ai-primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--anthem-ai-primary-color) 20%, white);
}

#anthem-ai-chat-sendBtn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--anthem-ai-primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s ease, background 0.2s;
}

#anthem-ai-chat-sendBtn:hover {
    transform: scale(1.05);
    background: color-mix(in srgb, var(--anthem-ai-primary-color) 80%, black);
}

#anthem-ai-chat-sendBtn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

/* Footer RGPD */
.anthem-ai-chat-footer {
    text-align: center;
    padding: 8px;
    font-size: 11px;
    color: #94a3b8;
    background: white;
    border-top: 1px solid #f8fafc;
}

/* Typing Indicator Loader */
#anthem-ai-chat-typing {
    align-self: flex-start;
    background: white;
    padding: 12px 16px;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-left: 36px;
    /* Offset for avatar */
}

#anthem-ai-chat-typing span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #cbd5e1;
    border-radius: 50%;
    margin: 0 2px;
    animation: anthemAiTyping 1.4s infinite both;
}

#anthem-ai-chat-typing span:nth-child(1) {
    animation-delay: 0s;
}

#anthem-ai-chat-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

#anthem-ai-chat-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes anthemAiTyping {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Variables (Mobile Options) */
@media (max-width: 480px) {
    #anthem-ai-chat-window {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
}

/* ── Feedback Bar ──────────────────────────────────────────── */
#anthem-ai-feedback-bar {
    display: none;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 6px 0;
    margin-top: 8px;
    font-size: 11px;
    color: #9ca3af;
    animation: anthemFadeIn .3s ease;
}

#anthem-ai-feedback-bar.visible {
    display: flex;
}

#anthem-ai-feedback-label {
    font-size: 11px;
    color: #9ca3af;
    margin-right: 6px;
}

#anthem-ai-feedback-up,
#anthem-ai-feedback-down {
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 3px 8px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    transition: all .15s;
}

#anthem-ai-feedback-up:hover {
    background: #f0fdf4;
    border-color: #86efac;
    transform: scale(1.05);
}

#anthem-ai-feedback-down:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    transform: scale(1.05);
}

#anthem-ai-feedback-thanks {
    display: none;
    font-size: 12px;
    color: #00a32a;
    font-weight: 600;
}

/* ── Lead Capture Paywall ──────────────────────────────────── */
#anthem-ai-lead-panel {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(to bottom,
            rgba(15, 23, 42, 0.05) 0%,
            rgba(15, 23, 42, 0.72) 30%,
            rgba(15, 23, 42, 0.92) 100%);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

#anthem-ai-lead-panel.is-visible {
    display: flex;
    animation: anthemLeadReveal 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes anthemLeadReveal {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Card centrale */
.anthem-ai-lead-inner {
    background: white;
    border-radius: 20px;
    padding: 28px 24px 22px;
    width: 100%;
    max-width: 320px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.22);
    text-align: center;
    animation: anthemLeadCard 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes anthemLeadCard {
    from {
        transform: scale(0.9) translateY(12px);
        opacity: 0;
    }

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

.anthem-ai-lead-icon {
    font-size: 34px;
    display: block;
    margin-bottom: 12px;
    animation: anthemLeadIconPop 0.5s 0.1s ease both;
}

@keyframes anthemLeadIconPop {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    70% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.anthem-ai-lead-title {
    margin: 0 0 8px;
    font-size: 16.5px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.3px;
    line-height: 1.3;
}

.anthem-ai-lead-desc {
    margin: 0 0 14px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.55;
}

/* Liste bénéfices */
.anthem-ai-lead-perks {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.anthem-ai-lead-perks li {
    font-size: 12.5px;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 7px 11px;
    font-weight: 500;
}

/* Formulaire */
#anthem-ai-lead-form {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

#anthem-ai-lead-email {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13.5px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    font-family: inherit;
    text-align: center;
    background: #f8fafc;
}

#anthem-ai-lead-email:focus {
    background: white;
    border-color: var(--anthem-ai-primary-color, #2563EB);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--anthem-ai-primary-color, #2563EB) 15%, transparent);
}

#anthem-ai-lead-email.anthem-ai-email-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
    animation: anthemAiShake 0.4s ease;
}

/* CTA button */
.anthem-ai-lead-submit {
    background: var(--anthem-ai-primary-color, #2563EB);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s, transform .2s, box-shadow .2s;
    font-family: inherit;
    letter-spacing: -0.2px;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--anthem-ai-primary-color, #2563EB) 38%, transparent);
}

.anthem-ai-lead-submit:hover {
    opacity: .92;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px color-mix(in srgb, var(--anthem-ai-primary-color, #2563EB) 32%, transparent);
}

.anthem-ai-lead-submit:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Mention légale */
.anthem-ai-lead-legal {
    margin-top: 10px;
    font-size: 10.5px;
    color: #94a3b8;
    line-height: 1.4;
}

/* ── Shake pour email invalide ───────────────────────────────── */
@keyframes anthemAiShake {

    0%,
    100% {
        transform: translateX(0);
    }

    15% {
        transform: translateX(-5px);
    }

    35% {
        transform: translateX(5px);
    }

    55% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }

    90% {
        transform: translateX(-2px);
    }
}
/* ───────────────────────────────────────────────────────────────────
   🌙 DARK MODE
   ─────────────────────────────────────────────────────────────────── */

.anthem-ai-dark-theme #anthem-ai-chat-window {
    background: #1a1a1a;
    color: #e0e0e0;
}

.anthem-ai-dark-theme .anthem-ai-chat-header {
    background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
    border-bottom: 1px solid #333;
}

.anthem-ai-dark-theme .anthem-ai-chat-header h3 {
    color: #ffffff;
}

.anthem-ai-dark-theme #anthem-ai-chat-messages {
    background: #1a1a1a;
}

.anthem-ai-dark-theme #anthem-ai-chat-messages::-webkit-scrollbar-thumb {
    background: #444;
}

.anthem-ai-dark-theme .anthem-ai-msg.user {
    background: var(--anthem-ai-primary-color);
    color: #ffffff;
}

.anthem-ai-dark-theme .anthem-ai-msg.bot {
    background: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #333;
}

/* Fix pour les titres et texte en gras dans les messages bot */
.anthem-ai-dark-theme .anthem-ai-msg.bot h1,
.anthem-ai-dark-theme .anthem-ai-msg.bot h2,
.anthem-ai-dark-theme .anthem-ai-msg.bot h3,
.anthem-ai-dark-theme .anthem-ai-msg.bot h4 {
    color: #ffffff;
}

.anthem-ai-dark-theme .anthem-ai-msg.bot strong {
    color: #f0f0f0;
}

.anthem-ai-dark-theme .anthem-ai-msg.bot p {
    color: #e0e0e0;
}

.anthem-ai-dark-theme .anthem-ai-msg.bot a {
    color: var(--anthem-ai-primary-color);
}

.anthem-ai-dark-theme .anthem-ai-msg.bot code {
    background: #1f1f1f;
    color: #61dafb;
    border: 1px solid #333;
}

.anthem-ai-dark-theme .anthem-ai-msg.bot pre {
    background: #1f1f1f;
    border-left: 3px solid var(--anthem-ai-primary-color);
}

.anthem-ai-dark-theme .anthem-ai-msg.bot pre code {
    background: transparent;
    border: none;
}

.anthem-ai-dark-theme .anthem-ai-msg.bot blockquote {
    border-left-color: var(--anthem-ai-primary-color);
    color: #b0b0b0;
}

.anthem-ai-dark-theme .anthem-ai-chat-input-area {
    background: #2a2a2a;
    border-top: 1px solid #333;
}

.anthem-ai-dark-theme #anthem-ai-chat-input {
    background: #1f1f1f;
    color: #e0e0e0;
    border: 1px solid #333;
}

.anthem-ai-dark-theme #anthem-ai-chat-input::placeholder {
    color: #666;
}

/* Effet focus plus subtil et élégant */
.anthem-ai-dark-theme #anthem-ai-chat-input:focus {
    border-color: var(--anthem-ai-primary-color);
    background: #252525;
    box-shadow: 0 0 0 1px var(--anthem-ai-primary-color), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.anthem-ai-dark-theme #anthem-ai-chat-sendBtn {
    background: var(--anthem-ai-primary-color);
    color: #ffffff;
}

.anthem-ai-dark-theme #anthem-ai-chat-sendBtn:hover:not(:disabled) {
    background: var(--anthem-ai-primary-color);
    opacity: 0.9;
}

.anthem-ai-dark-theme .anthem-ai-chat-footer {
    background: #1f1f1f;
    color: #888;
    border-top: 1px solid #333;
}

.anthem-ai-dark-theme #anthem-ai-chat-typing {
    background: #2a2a2a;
    border: 1px solid #333;
}

.anthem-ai-dark-theme #anthem-ai-chat-typing span {
    background: #555;
}

.anthem-ai-dark-theme .anthem-ai-msg-avatar {
    background: #2a2a2a;
    border: 1px solid #333;
    color: #888;
}

.anthem-ai-dark-theme #anthem-ai-feedback-bar {
    background: #2a2a2a;
    border-top: 1px solid #333;
}

.anthem-ai-dark-theme #anthem-ai-feedback-label {
    color: #b0b0b0;
}

.anthem-ai-dark-theme #anthem-ai-feedback-bar button {
    background: #1f1f1f;
    border: 1px solid #444;
    color: #e0e0e0;
}

.anthem-ai-dark-theme #anthem-ai-feedback-bar button:hover {
    background: #333;
    border-color: #555;
}

.anthem-ai-dark-theme #anthem-ai-lead-panel {
    background: rgba(0, 0, 0, 0.85);
}

.anthem-ai-dark-theme .anthem-ai-lead-inner {
    background: #1f1f1f;
    border: 1px solid #333;
}

.anthem-ai-dark-theme .anthem-ai-lead-title {
    color: #ffffff;
}

.anthem-ai-dark-theme .anthem-ai-lead-desc {
    color: #b0b0b0;
}

.anthem-ai-dark-theme .anthem-ai-lead-perks {
    background: transparent;
}

.anthem-ai-dark-theme .anthem-ai-lead-perks li {
    color: #d0d0d0;
    background: #2a2a2a;
    border-color: #444;
}

.anthem-ai-dark-theme #anthem-ai-lead-email {
    background: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #444;
}

/* Effet focus plus subtil et élégant pour le paywall */
.anthem-ai-dark-theme #anthem-ai-lead-email:focus {
    border-color: var(--anthem-ai-primary-color);
    background: #2f2f2f;
    box-shadow: 0 0 0 1px var(--anthem-ai-primary-color), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.anthem-ai-dark-theme .anthem-ai-lead-submit {
    background: var(--anthem-ai-primary-color);
    color: #ffffff;
}

.anthem-ai-dark-theme .anthem-ai-lead-legal {
    color: #888;
}

/* ==========================================================================
   Suggestions contextuelles (Quick Replies)
   ========================================================================== */

.anthem-ai-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 8px;
    animation: fadeInUp 0.3s ease;
}

.anthem-ai-suggestion-btn {
    background: transparent;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
}

.anthem-ai-suggestion-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
    transform: none;
    box-shadow: none;
}

.anthem-ai-suggestion-btn:active {
    background: #f3f4f6;
    transform: scale(0.98);
}

/* Dark theme pour les suggestions */
.anthem-ai-dark-theme .anthem-ai-suggestion-btn {
    background: transparent;
    color: #9ca3af;
    border-color: #374151;
}

.anthem-ai-dark-theme .anthem-ai-suggestion-btn:hover {
    background: #1f2937;
    border-color: #4b5563;
    color: #d1d5db;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
