/* /chatbot — page ChatGPT (indépendant du widget WhatsApp dans chatbot.css) */

body:has(.ai-chatbot-page--gpt) .preloader,
body:has(.ai-chatbot-page--gpt) #btn-back-to-top,
body:has(.ai-chatbot-page--gpt) .whatsapp-ico-container,
body:has(.ai-chatbot-page--gpt) .install-popup,
body:has(.ai-chatbot-page--gpt) .currencyMenu {
    display: none !important;
}

body:has(.ai-chatbot-page--gpt) main > footer,
body:has(.ai-chatbot-page--gpt) main > .footer {
    display: none !important;
}

/* Espace vide du 2e .header-margin sous le menu (gotrip) */
body:has(.ai-chatbot-page--gpt) main .header + .header-margin {
    display: none !important;
    margin: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
}

body:has(.ai-chatbot-page--gpt) .ai-chatbot-page--gpt {
    margin-top: 0;
    padding-top: 0;
}

body:has(.ai-chatbot-page--gpt) {
    overflow: hidden;
    height: 100dvh;
}

body:has(.ai-chatbot-page--gpt) main {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100dvh;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.ai-chatbot-page--gpt {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    background: #fff;
    font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

.ai-chatbot-page--gpt .ai-chatbot-page-body,
.ai-chatbot-page--gpt .ai-chatbot-page-main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.ai-chatbot-standalone--gpt {
    flex: 1 1 auto;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    --ai-chatbot-thread-pad-x: 20px;
    --ai-chatbot-thread-pad-top: 16px;
    --ai-chatbot-thread-pad-bottom: 32px;
    --ai-chat-surface: #ffffff;
    --ai-chat-border: #e8eaef;
    --ai-chat-muted: #6b7280;
    --ai-chat-user-bg: #ffffff;
    --ai-chat-assistant-bg: #ffffff;
}

@media (min-width: 768px) {
    .ai-chatbot-standalone--gpt {
        --ai-chatbot-thread-pad-x: 32px;
    }
}

/* Sidebar historique (style ChatGPT) */
.ai-chatbot-standalone--gpt .ai-chatbot-sidebar {
    flex: 0 0 260px;
    width: 260px;
    max-width: 85vw;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--ai-chat-surface);
    border-right: 1px solid var(--ai-chat-border);
    box-sizing: border-box;
    z-index: 20;
}

.ai-chatbot-standalone--gpt .ai-chatbot-sidebar-head {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 10px 8px;
}

.ai-chatbot-standalone--gpt .ai-chatbot-sidebar-new {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #d9d9e3;
    border-radius: 10px;
    background: #fff;
    color: #0d0d0d;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.ai-chatbot-standalone--gpt .ai-chatbot-sidebar-new:hover {
    background: #ececec;
    border-color: #c5c5d2;
}

.ai-chatbot-standalone--gpt .ai-chatbot-sidebar-new i {
    font-size: 13px;
    opacity: 0.85;
}

.ai-chatbot-standalone--gpt .ai-chatbot-sidebar-close {
    display: none;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #6e6e80;
    cursor: pointer;
}

.ai-chatbot-standalone--gpt .ai-chatbot-sidebar-close:hover {
    background: #ececec;
    color: #0d0d0d;
}

.ai-chatbot-standalone--gpt .ai-chatbot-sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 4px 8px 16px;
}

.ai-chatbot-standalone--gpt .ai-chatbot-conv-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ai-chatbot-standalone--gpt .ai-chatbot-conv-row {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 2px;
    border-radius: 8px;
}

.ai-chatbot-standalone--gpt .ai-chatbot-conv-row:hover {
    background: #f3f4f6;
}

.ai-chatbot-standalone--gpt .ai-chatbot-conv-row:has(.ai-chatbot-conv-item.is-active) {
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px var(--ai-chat-border);
}

.ai-chatbot-standalone--gpt .ai-chatbot-conv-item {
    flex: 1 1 auto;
    min-width: 0;
    display: block;
    text-align: left;
    padding: 10px 8px 10px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #353740;
    font-size: 14px;
    line-height: 1.35;
    cursor: pointer;
    transition: background 0.12s ease;
}

.ai-chatbot-standalone--gpt .ai-chatbot-conv-title {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-chatbot-standalone--gpt .ai-chatbot-conv-item.is-active {
    color: #0d0d0d;
    font-weight: 500;
}

.ai-chatbot-standalone--gpt .ai-chatbot-conv-delete {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    margin-right: 4px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #8e8ea0;
    font-size: 13px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.ai-chatbot-standalone--gpt .ai-chatbot-conv-row:hover .ai-chatbot-conv-delete,
.ai-chatbot-standalone--gpt .ai-chatbot-conv-delete:focus {
    opacity: 1;
}

.ai-chatbot-standalone--gpt .ai-chatbot-conv-delete:hover {
    background: #fee2e2;
    color: #dc2626;
}

.ai-chatbot-standalone--gpt .ai-chatbot-sidebar-foot {
    flex-shrink: 0;
    padding: 8px 10px 12px;
    border-top: 1px solid #ececec;
}

.ai-chatbot-standalone--gpt .ai-chatbot-delete-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #6e6e80;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

.ai-chatbot-standalone--gpt .ai-chatbot-delete-all:hover {
    background: #fee2e2;
    color: #dc2626;
}

.ai-chatbot-standalone--gpt .ai-chatbot-delete-all[hidden] {
    display: none !important;
}

.ai-chatbot-standalone--gpt .ai-chatbot-layout-main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    background: var(--ai-chat-surface);
}

.ai-chatbot-standalone--gpt .ai-chatbot-chat-column {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    order: 1;
}

.ai-chatbot-standalone--gpt .ai-chatbot-map-panel {
    display: none;
    flex: 0 0 40%;
    width: 40%;
    min-width: 300px;
    max-width: 440px;
    flex-direction: column;
    min-height: 0;
    order: 2;
    background: #f8fafc;
    border-left: 1px solid var(--ai-chat-border);
    box-sizing: border-box;
}

.ai-chatbot-standalone--gpt.has-hotel-map .ai-chatbot-map-panel {
    display: flex;
}

.ai-chatbot-standalone--gpt.has-hotel-map.is-landing .ai-chatbot-map-panel {
    display: none;
}

.ai-chatbot-standalone--gpt .ai-chatbot-map-head {
    flex-shrink: 0;
    padding: 14px 16px 10px;
    background: var(--ai-chat-surface);
    border-bottom: 1px solid var(--ai-chat-border);
}

.ai-chatbot-standalone--gpt .ai-chatbot-map-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.ai-chatbot-standalone--gpt .ai-chatbot-map-sub {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--ai-chat-muted);
    line-height: 1.4;
}

.ai-chatbot-standalone--gpt .ai-chatbot-map-canvas {
    flex: 1 1 auto;
    min-height: 200px;
    width: 100%;
    z-index: 1;
}

.ai-chatbot-standalone--gpt .ai-chatbot-map-list {
    flex: 0 0 auto;
    max-height: 168px;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--ai-chat-surface);
    border-top: 1px solid var(--ai-chat-border);
}

.ai-chatbot-standalone--gpt .ai-chatbot-map-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--ai-chat-border);
    border-radius: 10px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ai-chatbot-standalone--gpt .ai-chatbot-map-card:hover {
    border-color: #c7d2fe;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
}

.ai-chatbot-standalone--gpt .ai-chatbot-map-card-name {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
}

.ai-chatbot-standalone--gpt .ai-chatbot-map-card-stars {
    font-size: 11px;
    color: #ca8a04;
}

.ai-chatbot-standalone--gpt .ai-chatbot-map-card-price {
    font-size: 12px;
    font-weight: 600;
    color: #4f46e5;
}

.ai-chatbot-standalone--gpt .ai-chatbot-map-popup {
    font-size: 13px;
    line-height: 1.45;
}

.ai-chatbot-standalone--gpt .ai-chatbot-map-popup a {
    color: #4f46e5;
    font-weight: 600;
}

@media (max-width: 900px) {
    .ai-chatbot-standalone--gpt.has-hotel-map .ai-chatbot-layout-main {
        flex-direction: column;
    }

    .ai-chatbot-standalone--gpt.has-hotel-map .ai-chatbot-map-panel {
        flex: 0 0 auto;
        width: 100%;
        max-width: none;
        min-width: 0;
        max-height: 42vh;
        order: 2;
        border-left: none;
        border-bottom: 1px solid var(--ai-chat-border);
    }

    .ai-chatbot-standalone--gpt.has-hotel-map .ai-chatbot-chat-column {
        order: 1;
    }

    .ai-chatbot-standalone--gpt .ai-chatbot-map-canvas {
        min-height: 160px;
    }

    .ai-chatbot-standalone--gpt .ai-chatbot-map-list {
        max-height: 120px;
    }
}

.ai-chatbot-standalone--gpt .ai-chatbot-sidebar-open {
    display: none;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    margin-right: 4px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #353740;
    cursor: pointer;
}

.ai-chatbot-standalone--gpt .ai-chatbot-sidebar-open:hover {
    background: #ececec;
}

body.ai-chatbot-sidebar-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 10040;
    pointer-events: auto;
}

@media (max-width: 900px) {
    .ai-chatbot-standalone--gpt .ai-chatbot-conv-delete {
        opacity: 0.75;
    }

    .ai-chatbot-standalone--gpt .ai-chatbot-sidebar {
        position: fixed;
        top: var(--ai-chatbot-site-header-h, 0);
        left: 0;
        bottom: 0;
        z-index: 10045;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    }

    .ai-chatbot-standalone--gpt .ai-chatbot-sidebar.is-open {
        transform: translateX(0);
    }

    .ai-chatbot-standalone--gpt .ai-chatbot-sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .ai-chatbot-standalone--gpt .ai-chatbot-sidebar-open {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* Panneau : messages scrollables + input toujours visible en bas */
.ai-chatbot-standalone--gpt .ai-chatbot-panel {
    flex: 1 1 auto;
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    justify-items: center;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0;
    margin: 0 !important;
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 1 !important;
    background: #fff;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    font-family: inherit;
}

.ai-chatbot-standalone--gpt .ai-chatbot-panel.is-open {
    display: grid !important;
}

/* Zone scrollable (header + messages) */
.ai-chatbot-standalone--gpt .ai-chatbot-shell {
    grid-row: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 768px;
    min-height: 0;
    height: 100%;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
}

/* Header */
.ai-chatbot-standalone--gpt .ai-chatbot-header--page {
    flex-shrink: 0;
    width: 100%;
    padding: 10px var(--ai-chatbot-thread-pad-x) 12px;
    background: #fff;
    border-bottom: 1px solid #ececec;
    box-sizing: border-box;
}

.ai-chatbot-standalone--gpt .ai-chatbot-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 8px 12px;
    background: var(--ai-chat-surface);
    border: 1px solid var(--ai-chat-border);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    box-sizing: border-box;
}

.ai-chatbot-standalone--gpt .ai-chatbot-header-center {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
}

.ai-chatbot-standalone--gpt .ai-chatbot-header-titles {
    min-width: 0;
    text-align: left;
    line-height: 1.2;
}

.ai-chatbot-standalone--gpt .ai-chatbot-header-icon,
.ai-chatbot-standalone--gpt .ai-chatbot-header-icon-fa {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    color: #353740;
    object-fit: cover;
}

.ai-chatbot-standalone--gpt .ai-chatbot-header-icon-fa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ai-chatbot-standalone--gpt .ai-chatbot-header--page h6 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #0d0d0d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-chatbot-standalone--gpt .ai-chatbot-header--page small {
    display: block;
    margin: 0;
    font-size: 11px;
    color: #6e6e80;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-chatbot-standalone--gpt .ai-chatbot-header--page .ai-chatbot-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.ai-chatbot-standalone--gpt .ai-chatbot-header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.ai-chatbot-standalone--gpt .ai-chatbot-header-btn--icon {
    width: 30px;
    height: 30px;
    min-width: 30px;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    color: #6e6e80;
}

.ai-chatbot-standalone--gpt .ai-chatbot-header-btn--icon:hover,
.ai-chatbot-standalone--gpt .ai-chatbot-header-btn--icon:focus-visible {
    background: #ececec;
    outline: none;
}

.ai-chatbot-standalone--gpt .ai-chatbot-header-btn--new {
    height: 30px;
    min-width: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: #0d0d0d;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
}

.ai-chatbot-standalone--gpt .ai-chatbot-header-btn--new:hover,
.ai-chatbot-standalone--gpt .ai-chatbot-header-btn--new:focus-visible {
    background: #2d2d2d;
    outline: none;
}

.ai-chatbot-standalone--gpt .ai-chatbot-header-btn-label {
    display: inline;
}

@media (max-width: 480px) {
    .ai-chatbot-standalone--gpt {
        --ai-chatbot-thread-pad-x: 16px;
    }

    .ai-chatbot-standalone--gpt .ai-chatbot-header--page small {
        display: none;
    }

    .ai-chatbot-standalone--gpt .ai-chatbot-header-btn-label {
        display: none;
    }

    .ai-chatbot-standalone--gpt .ai-chatbot-header-btn--new {
        width: 30px;
        padding: 0;
    }
}

/* Messages — seul bloc qui scroll */
.ai-chatbot-standalone--gpt .ai-chatbot-messages {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0 !important;
    height: 0;
    overflow-y: auto !important;
    overflow-x: hidden;
    overscroll-behavior: contain;
    padding: var(--ai-chatbot-thread-pad-top) var(--ai-chatbot-thread-pad-x) var(--ai-chatbot-thread-pad-bottom);
    background: #fff;
    scroll-behavior: smooth;
    scroll-padding: var(--ai-chatbot-thread-pad-top) var(--ai-chatbot-thread-pad-x) var(--ai-chatbot-thread-pad-bottom);
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.ai-chatbot-standalone--gpt .ai-chatbot-messages::-webkit-scrollbar {
    width: 8px;
}

.ai-chatbot-standalone--gpt .ai-chatbot-messages::-webkit-scrollbar-thumb {
    background: #d9d9e3;
    border-radius: 4px;
}

.ai-chatbot-standalone--gpt .ai-chatbot-msg {
    width: 100%;
    max-width: 100%;
    margin: 0 0 12px;
    padding: 4px 0;
    box-sizing: border-box;
    border-radius: 0;
    box-shadow: none;
    font-size: 15px;
    line-height: 1.65;
    word-break: break-word;
    overflow-wrap: anywhere;
    scroll-margin-top: var(--ai-chatbot-thread-pad-top);
    scroll-margin-bottom: var(--ai-chatbot-thread-pad-bottom);
}

.ai-chatbot-standalone--gpt .ai-chatbot-msg.user {
    display: block;
    text-align: left;
    background: var(--ai-chat-user-bg);
    color: #111827;
    border: 1px solid var(--ai-chat-border);
    border-radius: 20px 20px 4px 20px;
    max-width: 85%;
    margin-left: auto;
    margin-right: 0;
    padding: 12px 16px;
    width: fit-content;
    white-space: pre-wrap;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ai-chatbot-standalone--gpt .ai-chatbot-msg.assistant {
    background: transparent;
    color: #111827;
    border: none;
    padding: 4px 0;
    position: relative;
    max-width: 100%;
}

.ai-chatbot-standalone--gpt .ai-chatbot-msg.assistant + .ai-chatbot-msg.assistant,
.ai-chatbot-standalone--gpt .ai-chatbot-msg.user + .ai-chatbot-msg.user {
    padding-top: 0;
}

.ai-chatbot-standalone--gpt .ai-chatbot-msg.assistant.typing {
    opacity: 1;
    font-style: normal;
    color: var(--ai-chat-muted);
    font-size: 15px;
    max-width: fit-content;
    background: var(--ai-chat-assistant-bg);
    border: 1px solid var(--ai-chat-border);
    border-radius: 4px 20px 20px 20px;
    padding: 12px 18px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.ai-chatbot-standalone--gpt .ai-chatbot-msg.assistant.is-streaming .ai-chatbot-content {
    white-space: pre-wrap;
}

.ai-chatbot-standalone--gpt .ai-chatbot-msg.assistant.is-streaming .ai-chatbot-content::after {
    content: '';
    display: inline-block;
    width: 2px;
    height: 1.05em;
    margin-left: 2px;
    vertical-align: text-bottom;
    background: #0d0d0d;
    animation: ai-chatbot-cursor-blink 0.85s step-end infinite;
}

@keyframes ai-chatbot-cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.ai-chatbot-standalone--gpt .ai-chatbot-content.ai-chatbot-welcome {
    text-align: left;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.65;
    color: #0d0d0d;
    white-space: pre-line;
}

.ai-chatbot-standalone--gpt .ai-chatbot-msg.assistant .ai-chatbot-content {
    max-width: 100%;
    padding: 14px 18px;
    padding-right: 44px;
    box-sizing: border-box;
    font-size: 15px;
    line-height: 1.65;
    background: var(--ai-chat-assistant-bg);
    border: 1px solid var(--ai-chat-border);
    border-radius: 4px 20px 20px 20px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.ai-chatbot-standalone--gpt .ai-chatbot-msg.assistant .ai-chatbot-content > *:first-child {
    margin-top: 0;
}

.ai-chatbot-standalone--gpt .ai-chatbot-msg.assistant .ai-chatbot-content > *:last-child {
    margin-bottom: 0;
}

.ai-chatbot-standalone--gpt .ai-chatbot-msg.assistant .ai-chatbot-content p {
    margin: 0 0 12px;
}

.ai-chatbot-standalone--gpt .ai-chatbot-msg.assistant .ai-chatbot-content h1,
.ai-chatbot-standalone--gpt .ai-chatbot-msg.assistant .ai-chatbot-content h2,
.ai-chatbot-standalone--gpt .ai-chatbot-msg.assistant .ai-chatbot-content h3,
.ai-chatbot-standalone--gpt .ai-chatbot-msg.assistant .ai-chatbot-content h4 {
    margin: 16px 0 8px;
    font-weight: 600;
    color: #0d0d0d;
}

.ai-chatbot-standalone--gpt .ai-chatbot-msg.assistant .ai-chatbot-content a {
    color: #0969da;
    text-decoration: underline;
}

.ai-chatbot-standalone--gpt .ai-chatbot-msg.assistant .ai-chatbot-content ul,
.ai-chatbot-standalone--gpt .ai-chatbot-msg.assistant .ai-chatbot-content ol {
    margin: 8px 0 12px;
    padding-left: 1.4rem;
}

.ai-chatbot-standalone--gpt .ai-chatbot-msg.assistant .ai-chatbot-content code {
    font-size: 0.9em;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
}

.ai-chatbot-standalone--gpt .ai-chatbot-msg.assistant .ai-chatbot-content pre {
    background: #0d0d0d;
    color: #f4f4f4;
    padding: 14px 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 12px 0;
    font-size: 13px;
}

.ai-chatbot-standalone--gpt .ai-chatbot-msg.assistant .ai-chatbot-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.ai-chatbot-standalone--gpt .ai-chatbot-table-wrap {
    overflow-x: auto;
    margin: 12px 0;
    padding: 2px 4px;
    border: 1px solid var(--ai-chat-border);
    border-radius: 10px;
    background: #fafbfc;
    -webkit-overflow-scrolling: touch;
}

.ai-chatbot-standalone--gpt .ai-chatbot-msg.assistant .ai-chatbot-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ai-chatbot-standalone--gpt .ai-chatbot-msg.assistant .ai-chatbot-content th,
.ai-chatbot-standalone--gpt .ai-chatbot-msg.assistant .ai-chatbot-content td {
    padding: 8px 12px;
    border-bottom: 1px solid #ececec;
    text-align: left;
}

.ai-chatbot-standalone--gpt .ai-chatbot-msg.assistant .ai-chatbot-content th {
    background: #f3f4f6;
    font-weight: 600;
}

.ai-chatbot-standalone--gpt .ai-chatbot-msg-speak {
    position: absolute;
    top: 20px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #6e6e80;
    cursor: pointer;
}

.ai-chatbot-standalone--gpt .ai-chatbot-msg-speak:hover {
    background: #f3f4f6;
}

/* Footer / input — ligne fixe en bas du panneau (ne scroll pas) */
.ai-chatbot-standalone--gpt .ai-chatbot-footer--fixed {
    grid-row: 2;
    flex-shrink: 0;
    position: relative;
    width: 100%;
    max-width: 768px;
    margin: 0 auto;
    padding: 10px var(--ai-chatbot-thread-pad-x) 16px;
    background: #fff;
    /* border-top: 1px solid #ececec;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06); */
    box-sizing: border-box;
    z-index: 10;
}

.ai-chatbot-standalone--gpt .ai-chatbot-footer form,
.ai-chatbot-standalone--gpt .ai-chatbot-form {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
    margin: 0 auto;
    padding: 10px 12px 10px 16px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #d9d9e3;
    border-radius: 26px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.06);
}

.ai-chatbot-standalone--gpt .ai-chatbot-form.is-voice-active {
    border-color: #c5c5d2;
}

.ai-chatbot-standalone--gpt .ai-chatbot-form-field {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.ai-chatbot-standalone--gpt .ai-chatbot-voice-layer {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 24px;
    padding: 0;
    box-sizing: border-box;
}

.ai-chatbot-standalone--gpt .ai-chatbot-voice-layer[hidden] {
    display: none !important;
}

.ai-chatbot-standalone--gpt .ai-chatbot-form.is-voice-active .ai-chatbot-form-field input[type="text"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.ai-chatbot-standalone--gpt .ai-chatbot-form.is-voice-active .ai-chatbot-voice-layer {
    display: flex;
}

.ai-chatbot-standalone--gpt .ai-chatbot-form.is-voice-transcribing .ai-chatbot-voice-waves span {
    animation-duration: 0.55s;
    background: #0d0d0d;
}

.ai-chatbot-standalone--gpt .ai-chatbot-voice-waves {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 24px;
    flex-shrink: 0;
}

.ai-chatbot-standalone--gpt .ai-chatbot-voice-waves span {
    display: block;
    width: 3px;
    height: 8px;
    border-radius: 2px;
    background: #0d0d0d;
    animation: ai-chatbot-voice-bar 0.9s ease-in-out infinite;
}

.ai-chatbot-standalone--gpt .ai-chatbot-voice-waves span:nth-child(1) { animation-delay: 0s; }
.ai-chatbot-standalone--gpt .ai-chatbot-voice-waves span:nth-child(2) { animation-delay: 0.1s; }
.ai-chatbot-standalone--gpt .ai-chatbot-voice-waves span:nth-child(3) { animation-delay: 0.2s; }
.ai-chatbot-standalone--gpt .ai-chatbot-voice-waves span:nth-child(4) { animation-delay: 0.3s; }
.ai-chatbot-standalone--gpt .ai-chatbot-voice-waves span:nth-child(5) { animation-delay: 0.4s; }

@keyframes ai-chatbot-voice-bar {
    0%, 100% { height: 8px; opacity: 0.45; }
    50% { height: 22px; opacity: 1; }
}

.ai-chatbot-standalone--gpt .ai-chatbot-voice-label {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 500;
    color: #0d0d0d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-chatbot-standalone--gpt .ai-chatbot-form.is-voice-transcribing .ai-chatbot-voice-label {
    color: #6e6e80;
}

.ai-chatbot-standalone--gpt .ai-chatbot-form.is-voice-active .ai-chatbot-send {
    display: none !important;
}

.ai-chatbot-standalone--gpt .ai-chatbot-footer button[type="submit"],
.ai-chatbot-standalone--gpt .ai-chatbot-send {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
}

.ai-chatbot-standalone--gpt .ai-chatbot-footer input[type="text"] {
    flex: 1;
    min-height: 24px;
    padding: 6px 0;
    font-size: 16px;
    line-height: 1.5;
    border: none;
    outline: none;
    background: transparent;
    color: #0d0d0d;
    resize: none;
}

.ai-chatbot-standalone--gpt .ai-chatbot-footer input[type="text"]::placeholder {
    color: #8e8ea0;
}

.ai-chatbot-standalone--gpt .ai-chatbot-mic {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #6e6e80;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.ai-chatbot-standalone--gpt .ai-chatbot-mic:hover:not(:disabled) {
    background: #f4f4f4;
    color: #0d0d0d;
}

.ai-chatbot-standalone--gpt .ai-chatbot-mic.is-recording {
    background: #0d0d0d;
    color: #fff;
    border-radius: 50%;
}

.ai-chatbot-standalone--gpt .ai-chatbot-mic.is-recording:hover:not(:disabled) {
    background: #2d2d2d;
}

.ai-chatbot-standalone--gpt .ai-chatbot-mic:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.ai-chatbot-standalone--gpt .ai-chatbot-mic-idle,
.ai-chatbot-standalone--gpt .ai-chatbot-mic-active {
    font-size: 15px;
    line-height: 1;
}

.ai-chatbot-standalone--gpt .ai-chatbot-mic-active {
    font-size: 13px;
}

.ai-chatbot-standalone--gpt .ai-chatbot-footer button[type="submit"] {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border: none;
    border-radius: 50%;
    background: #0d0d0d;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.ai-chatbot-standalone--gpt .ai-chatbot-footer button[type="submit"]:hover {
    background: #333;
}

.ai-chatbot-standalone--gpt .ai-chatbot-footer button[type="submit"]:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Mobile / tablette — panneau sous le menu burger du site */
@media (max-width: 1199px) {
    body:has(.ai-chatbot-page--gpt) #header,
    body:has(.ai-chatbot-page--gpt) .header.is-sticky {
        z-index: 10050 !important;
    }

    body:has(.ai-chatbot-page--gpt) .header .header-menu,
    body:has(.ai-chatbot-page--gpt) .header .header-menu.is-menu-active {
        z-index: 10051 !important;
    }

    .ai-chatbot-standalone--gpt .ai-chatbot-panel {
        z-index: 40 !important;
    }
}

@media (max-width: 576px) {
    .ai-chatbot-standalone--gpt .ai-chatbot-panel {
        position: fixed !important;
        top: var(--ai-chatbot-site-header-h, 90px) !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: calc(100dvh - var(--ai-chatbot-site-header-h, 90px)) !important;
        max-height: calc(100dvh - var(--ai-chatbot-site-header-h, 90px)) !important;
        display: grid !important;
    }

    .ai-chatbot-standalone--gpt {
        --ai-chatbot-thread-pad-x: max(16px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
    }

    .ai-chatbot-standalone--gpt .ai-chatbot-header--page {
        padding-top: 8px;
    }

    .ai-chatbot-standalone--gpt .ai-chatbot-footer--fixed {
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }

    .ai-chatbot-standalone--gpt.is-landing .ai-chatbot-landing {
        min-height: calc(100dvh - var(--ai-chatbot-site-header-h, 90px));
    }
}

/* —— Landing hero (avant la 1re recherche) —— */
.ai-chatbot-landing {
    display: none;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
    width: 100%;
    position: relative;
    overflow: hidden;
    padding: 24px var(--ai-chatbot-thread-pad-x, 20px) 32px;
    box-sizing: border-box;
}

.ai-chatbot-standalone--gpt.is-landing .ai-chatbot-sidebar {
    display: none !important;
}

.ai-chatbot-standalone--gpt.is-landing .ai-chatbot-panel {
    display: none !important;
}

.ai-chatbot-standalone--gpt.is-landing .ai-chatbot-landing {
    display: flex;
}

.ai-chatbot-landing-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(165deg, rgba(8, 47, 73, 0.82) 0%, rgba(30, 27, 75, 0.72) 45%, rgba(88, 28, 135, 0.55) 100%),
        url('https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?auto=format&fit=crop&w=1920&q=80') center / cover no-repeat;
    z-index: 0;
}

.ai-chatbot-landing-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 20%, rgba(56, 189, 248, 0.25), transparent 70%);
    pointer-events: none;
}

.ai-chatbot-landing-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 720px;
    text-align: center;
    animation: ai-chatbot-landing-in 0.55s ease-out both;
}

@keyframes ai-chatbot-landing-in {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-chatbot-landing-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 28px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.ai-chatbot-landing-brand img,
.ai-chatbot-landing-brand-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    object-fit: cover;
}

.ai-chatbot-landing-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    font-size: 14px;
}

.ai-chatbot-landing-title {
    margin: 0 0 16px;
    font-size: clamp(2rem, 6vw, 3.25rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.ai-chatbot-landing-title-a {
    display: block;
    background: linear-gradient(90deg, #67e8f9, #a5f3fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ai-chatbot-landing-title-b {
    display: block;
    background: linear-gradient(90deg, #f9a8d4, #e9d5ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ai-chatbot-landing-lead {
    margin: 0 auto 28px;
    max-width: 520px;
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
}

.ai-chatbot-landing-compose {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px 8px 20px;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.5),
        0 20px 50px rgba(0, 0, 0, 0.25),
        0 0 80px rgba(56, 189, 248, 0.15);
}

.ai-chatbot-landing-compose input {
    flex: 1 1 auto;
    min-width: 0;
    border: none;
    background: transparent;
    font-size: 16px;
    line-height: 1.4;
    color: #0d0d0d;
    outline: none;
}

.ai-chatbot-landing-compose input::placeholder {
    color: #9ca3af;
}

.ai-chatbot-landing-send {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: #0d0d0d;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, transform 0.15s ease;
}

.ai-chatbot-landing-send:hover {
    background: #262626;
    transform: scale(1.04);
}

.ai-chatbot-landing-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.ai-chatbot-landing-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.ai-chatbot-landing-chip:hover {
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.55);
    transform: translateY(-1px);
}

.ai-chatbot-landing-chip i {
    font-size: 14px;
    opacity: 0.9;
}

.ai-chatbot-landing-resume {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 8px;
    margin-top: 16px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.ai-chatbot-landing-resume:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.5);
}

.ai-chatbot-landing-resume[hidden] {
    display: none !important;
}

.ai-chatbot-landing-resume > i {
    font-size: 13px;
    opacity: 0.9;
}

.ai-chatbot-landing-resume-meta {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.8;
}

.ai-chatbot-landing-resume-meta::before {
    content: '·';
    margin-right: 6px;
    opacity: 0.6;
}

.ai-chatbot-landing-powered {
    margin: 28px 0 0;
    padding: 0;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.72);
    text-align: center;
    letter-spacing: 0.02em;
}

.ai-chatbot-landing-powered a {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    text-decoration: none;
    margin-left: 0.35em;
}

.ai-chatbot-landing-powered a:hover {
    text-decoration: underline;
}

/* Mode conversation (après 1re recherche) */
.ai-chatbot-standalone--gpt:not(.is-landing) .ai-chatbot-panel {
    background: var(--ai-chat-surface);
}

.ai-chatbot-standalone--gpt:not(.is-landing) .ai-chatbot-shell {
    background: var(--ai-chat-surface);
}

.ai-chatbot-standalone--gpt:not(.is-landing) .ai-chatbot-messages {
    background: var(--ai-chat-surface);
}

.ai-chatbot-standalone--gpt:not(.is-landing) .ai-chatbot-header--page {
    background: var(--ai-chat-surface);
    border-bottom: 1px solid var(--ai-chat-border);
    box-shadow: none;
}

.ai-chatbot-standalone--gpt:not(.is-landing) .ai-chatbot-footer--fixed {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 24%);
}

.ai-chatbot-standalone--gpt:not(.is-landing) .ai-chatbot-msg.assistant.is-streaming .ai-chatbot-content {
    background: var(--ai-chat-assistant-bg);
    border: 1px solid var(--ai-chat-border);
    border-radius: 4px 20px 20px 20px;
    padding: 14px 18px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.ai-chatbot-standalone--gpt:not(.is-landing) .ai-chatbot-content.ai-chatbot-welcome {
    background: #f8fafc;
    border: 1px dashed var(--ai-chat-border);
    border-radius: 16px;
    padding: 16px 18px;
}
