/* presenter_ai_sidebar.css — sidebar chat Assistant IA (2026-08-31)
   Adapté de writer_ai_sidebar.css pour Presenter. */

.ai-chat-sidebar {
    width: 340px;
    min-width: 340px;
    background: #1e1e2e;
    border-left: 1px solid #333;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.2s ease, min-width 0.2s ease;
    font-size: 13px;
    color: #cdd6f4;
}

.ai-chat-sidebar.hidden {
    width: 0;
    min-width: 0;
    border-left: none;
}

.ai-chat-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #333;
    background: #181825;
    font-weight: 600;
    font-size: 13px;
    color: #cdd6f4;
}

.ai-chat-header-title {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-chat-header-clear {
    cursor: pointer;
    border: 1px solid #45475a;
    background: #313244;
    color: #a6adc8;
    border-radius: 5px;
    padding: 2px 8px;
    font-size: 11px;
}
.ai-chat-header-clear:hover { background: #45475a; color: #f38ba8; }
.ai-chat-header-clear:disabled { opacity: 0.5; cursor: default; }

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-chat-messages::-webkit-scrollbar { width: 4px; }
.ai-chat-messages::-webkit-scrollbar-thumb { background: #45475a; border-radius: 2px; }

.ai-chat-msg { display: flex; }
.ai-chat-msg-user { justify-content: flex-end; }
.ai-chat-msg-assistant { justify-content: flex-start; }

.ai-chat-bubble {
    max-width: 88%;
    padding: 8px 11px;
    border-radius: 10px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.ai-chat-msg-user .ai-chat-bubble {
    background: #89b4fa;
    color: #1e1e2e;
    border-bottom-right-radius: 2px;
}

.ai-chat-msg-assistant .ai-chat-bubble {
    background: #313244;
    color: #cdd6f4;
    border-bottom-left-radius: 2px;
}

.ai-chat-edit-card {
    background: #181825;
    border: 1px solid #45475a;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12.5px;
}

.ai-chat-edit-summary {
    font-weight: 600;
    color: #f9e2af;
    margin-bottom: 4px;
}

.ai-chat-edit-desc {
    color: #a6adc8;
    margin-bottom: 8px;
}

.ai-chat-edit-preview {
    background: #11111b;
    border-radius: 6px;
    padding: 8px;
    max-height: 160px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11.5px;
    color: #cdd6f4;
    margin-bottom: 8px;
}

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

.ai-chat-btn {
    border: 1px solid #45475a;
    background: #313244;
    color: #cdd6f4;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
}

.ai-chat-btn:hover { background: #45475a; }

.ai-chat-btn-apply {
    background: #2d8a4e;
    border-color: #2d8a4e;
    color: #fff;
    font-weight: 600;
}
.ai-chat-btn-apply:hover { background: #256e3f; }

.ai-chat-edit-applied {
    font-size: 12px;
    color: #a6adc8;
    font-style: italic;
}

.ai-chat-input-row {
    flex-shrink: 0;
    display: flex;
    gap: 6px;
    padding: 8px;
    border-top: 1px solid #333;
    background: #181825;
}

.ai-chat-input {
    flex: 1;
    resize: none;
    background: #11111b;
    border: 1px solid #45475a;
    border-radius: 8px;
    color: #cdd6f4;
    padding: 7px 9px;
    font-size: 13px;
    font-family: inherit;
}

.ai-chat-input:focus { outline: none; border-color: #89b4fa; }

.ai-chat-send-btn {
    flex-shrink: 0;
    width: 34px;
    border: none;
    background: #89b4fa;
    color: #1e1e2e;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
}

.ai-chat-send-btn:hover { background: #74a8f8; }
.ai-chat-send-btn:disabled { opacity: 0.5; cursor: default; }

.ai-chat-waiting { width: 100%; max-width: 100%; }
.ai-chat-waiting img {
    width: 100%; max-width: 260px; height: auto; display: block; margin: 0 auto;
    border-radius: 10px; border: 1px solid #45475a; background: #11111b;
}
