/* Recherche formations */
.ia-recherche-formation {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.ia-choix-produit {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.ia-liste-choix {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.ia-btn-choix-produit {
    text-align: left;
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    transition: all 0.2s;
}

.ia-btn-choix-produit:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.ia-btn-choix-produit i {
    margin-right: 10px;
}

.ia-liste-formations {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 10px;
}

.ia-formation-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
}

.ia-resultat-bdd {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.ia-btn-copier-siret {
    padding: 2px 8px;
    font-size: 11px;
    margin-left: 8px;
    vertical-align: middle;
}

.ia-btn-copier-siret:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}
/* Recherche entreprise */
.ia-recherche-entreprise {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    padding: 15px;
}

.ia-btn-recherche-entreprise {
    margin: 10px 0;
}

.ia-resultats-entreprise {
    background: #f8fafc;
    padding: 10px;
}

.ia-entreprise-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    margin: 8px 0;
}

.ia-entreprise-card strong {
    color: #1e40af;
    font-size: 14px;
}

.ia-ent-label {
    color: #64748b;
    font-size: 12px;
}
/* Recherche entreprise */
.ia-recherche-elargie {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
}

.ia-form-elargie {
    margin: 15px 0;
}

.ia-form-elargie .ia-form-group {
    margin-bottom: 12px;
}

.ia-form-elargie label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 13px;
    color: #495057;
}

.ia-form-elargie input.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
}

.ia-form-elargie input.form-control:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.ia-form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.ia-form-buttons .btn {
    padding: 8px 16px;
    font-size: 14px;
}

.ia-resultats-entreprise {
    max-height: 400px;
    overflow-y: auto;
}

.ia-entreprise-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
}

.ia-entreprise-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ia-ent-label {
    font-weight: 600;
    color: #495057;
    display: inline-block;
    min-width: 70px;
}
/* ===== BOUTON D'OUVERTURE ===== */
.ia-help-popup {
    position: absolute;
    top: 55px;
    right: 60px;
    z-index: 10002;
    animation: iaHelpFadeIn 0.2s ease;
}

.ia-btn-help {
    background: rgba(102, 126, 234, 0.1);
    border: none;
    color: #667eea;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
/* Bouton aide */
.ia-help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 8px;
    transition: all 0.2s ease;
}

.ia-help-btn:hover {
    background: #667eea;
    color: #fff;
    transform: scale(1.1);
}

/* Popup aide */
.ia-help-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10002;
    animation: iaHelpFadeIn 0.2s ease;
}

@keyframes iaHelpFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.ia-help-popup {
    position: absolute;
    top: 55px;
    right: 10px;
    left: auto;
    z-index: 10002;
    animation: iaHelpFadeIn 0.2s ease;
}
.ia-help-popup-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 20px;
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
}

.ia-help-popup-content h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

.ia-help-popup-content p {
    margin: 0 0 12px 0;
    font-size: 13px;
    line-height: 1.5;
    color: #555;
}

.ia-help-popup-content p:last-child {
    margin-bottom: 0;
}

.ia-help-popup-close {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 22px;
    color: #999;
    cursor: pointer;
}

.ia-help-popup-close:hover {
    color: #333;
}
.ia-btn-help:hover {
    background: #667eea;
    color: #fff;
}
.btn-ia-assistant {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    top: 11px;
    animation: pulse-glow 2s ease-in-out infinite;
	margin-left: 10px;
}

.btn-ia-assistant:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-ia-assistant i {
    margin-right: 8px;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(102, 126, 234, 0.6); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.badge-ia-historique {
    background: #ef4444;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

/* ===== OVERLAY PLEIN ÉCRAN ===== */
.ia-chat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.ia-chat-overlay.active {
    display: flex;
    animation: fadeIn 0.2s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== CONTAINER PRINCIPAL ===== */
.ia-chat-container {
    width: 95%;
    max-width: 1400px;
    height: 90%;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    overflow: hidden;
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== SIDEBAR GAUCHE ===== */
.ia-sidebar {
    width: 280px;
    background: #f7f7f8;
    border-right: 1px solid #e5e5e5;
    display: flex;
    flex-direction: column;
}

.ia-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.ia-sidebar-header h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
}

.ia-btn-new-chat {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.ia-btn-new-chat:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ===== LISTE DES CONVERSATIONS ===== */
.ia-conversations-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.ia-conversation-item {
    padding: 12px;
    margin-bottom: 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    border: 1px solid transparent;
}

.ia-conversation-item:hover {
    background: #f0f0f1;
    border-color: #e0e0e1;
}

.ia-conversation-item.active {
    background: #ececf1;
    border-color: #667eea;
}

.ia-conversation-item.is-current {
    border-left: 3px solid #667eea;
}

.ia-conversation-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ia-conversation-meta {
    font-size: 12px;
    color: #999;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ia-conversation-actions {
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s;
}

.ia-conversation-item:hover .ia-conversation-actions {
    opacity: 1;
}

.ia-btn-action {
    padding: 4px 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #999;
    border-radius: 4px;
    transition: all 0.2s;
}

.ia-btn-action:hover {
    background: #e0e0e1;
    color: #333;
}

.ia-star-favorite {
    color: #fbbf24 !important;
}

/* ===== SECTION FAVORIS ===== */
.ia-favorites-section {
    padding: 15px 10px;
    border-bottom: 1px solid #e5e5e5;
}

.ia-favorites-section h4 {
    font-size: 13px;
    color: #666;
    margin: 0 0 10px 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== QUOTAS SIDEBAR ===== */
.ia-sidebar-quotas {
    padding: 15px;
    border-top: 1px solid #e5e5e5;
    background: #f0f0f1;
}

.ia-sidebar-quotas h4 {
    font-size: 12px;
    color: #666;
    margin: 0 0 12px 0;
    text-transform: uppercase;
}

.ia-quota-bar {
    margin-bottom: 10px;
}

.ia-quota-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.ia-quota-progress {
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    overflow: hidden;
}

.ia-quota-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.ia-quota-fill.groq {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.ia-quota-fill.gemini {
    background: linear-gradient(90deg, #4285f4, #1a73e8);
}

.ia-quota-fill.exhausted {
    background: linear-gradient(90deg, #ef4444, #dc2626) !important;
}

.ia-quota-reset {
    font-size: 11px;
    color: #999;
    text-align: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e5e5e5;
}

/* ===== STATS RAG SIDEBAR ===== */
.ia-sidebar-stats {
    padding: 15px;
    border-top: 1px solid #e5e5e5;
    background: #f0f0f1;
}

.ia-sidebar-stats h4 {
    font-size: 12px;
    color: #666;
    margin: 0 0 10px 0;
    text-transform: uppercase;
}

#ia_rag_stats_content {
    display: flex;
    gap: 10px;
}

.ia-rag-stat {
    flex: 1;
    text-align: center;
    background: white;
    padding: 8px;
    border-radius: 6px;
}

.ia-rag-stat-value {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
}

.ia-rag-stat-label {
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
}

/* ===== ZONE PRINCIPALE ===== */
.ia-main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

/* ===== HEADER ===== */
.ia-chat-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.ia-chat-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.ia-chat-stats {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

.ia-provider-badge {
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.ia-provider-badge.exhausted {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.ia-stat-info {
    color: #10b981;
    font-size: 12px;
}

.ia-btn-close,
.ia-btn-admin {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.ia-btn-close:hover,
.ia-btn-admin:hover {
    background: #f7f7f8;
}

/* ===== ZONE DES MESSAGES ===== */
.ia-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    background: linear-gradient(to bottom, #ffffff 0%, #f9fafb 100%);
}

.ia-message {
    margin-bottom: 24px;
    animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ia-message-user {
    display: flex;
    justify-content: flex-end;
}

.ia-message-assistant {
    display: flex;
    justify-content: flex-start;
}

.ia-message-bubble {
    max-width: 70%;
    padding: 16px 20px;
    border-radius: 18px;
    position: relative;
}

.ia-message-user .ia-message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.ia-message-assistant .ia-message-bubble {
    background: #f7f7f8;
    color: #333;
    border: 1px solid #e5e5e5;
}

.ia-message-content {
    line-height: 1.6;
    word-wrap: break-word;
}

.ia-message-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 11px;
    opacity: 0.7;
}

.ia-message-user .ia-message-meta {
    color: rgba(255, 255, 255, 0.9);
    justify-content: flex-end;
}

.ia-message-assistant .ia-message-meta {
    color: #999;
}

/* ===== BADGE CACHE ===== */
.ia-cache-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

.ia-cache-badge i {
    margin-right: 3px;
}

/* ===== PROVIDER TAG ===== */
.ia-provider-tag {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

.ia-provider-tag.groq {
    background: linear-gradient(135deg, #f59e0b20 0%, #d9770620 100%);
    color: #d97706;
    border: 1px solid #f59e0b40;
}

.ia-provider-tag.gemini {
    background: linear-gradient(135deg, #4285f420 0%, #1a73e820 100%);
    color: #1a73e8;
    border: 1px solid #4285f440;
}

/* ===== SOURCES DE TUTOS ===== */


.ia-source-tag {
    display: inline-block;
    background: linear-gradient(135deg, #667eea20 0%, #764ba220 100%);
    color: #667eea;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    margin-right: 6px;
    margin-bottom: 4px;
    border: 1px solid #667eea40;
    font-weight: 500;
}

.ia-source-tag:hover {
    background: linear-gradient(135deg, #667eea30 0%, #764ba230 100%);
    cursor: default;
}

/* ===== EMPTY STATE ===== */
.ia-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
}

.ia-empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.ia-empty-state-title {
    font-size: 24px;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
}

.ia-empty-state-text {
    font-size: 16px;
    color: #999;
}

.ia-empty-state-hint {
    margin-top: 20px;
    font-size: 13px;
    color: #999;
    background: #f7f7f8;
    padding: 10px 16px;
    border-radius: 8px;
}

.ia-empty-state-hint i {
    color: #667eea;
    margin-right: 5px;
}

/* ===== FEEDBACK ===== */
.ia-feedback-container {
    padding: 15px 30px;
    border-top: 1px solid #e5e5e5;
    background: #fef3c7;
}

.ia-btn-feedback {
    width: 100%;
    padding: 12px 20px;
    background: white;
    border: 2px dashed #f59e0b;
    border-radius: 8px;
    color: #92400e;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.ia-btn-feedback:hover {
    background: #fffbeb;
    border-color: #d97706;
}

.ia-btn-feedback i {
    margin-right: 8px;
    color: #f59e0b;
}

/* ===== QUOTA WARNING ===== */
.ia-quota-warning {
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ia-quota-warning i {
    color: #ef4444;
}

/* ===== ZONE DE SAISIE ===== */
.ia-input-area {
    padding: 20px 30px;
    border-top: 1px solid #e5e5e5;
    background: white;
}

.ia-input-wrapper {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.ia-input-container {
    flex: 1;
    position: relative;
}

.ia-input {
    width: 100%;
    min-height: 52px;
    max-height: 200px;
    padding: 14px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    font-size: 15px;
    resize: none;
    font-family: inherit;
    transition: all 0.2s;
}

.ia-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ia-input-options {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.ia-option-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ia-option-group label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.ia-option-group input[type="checkbox"] {
    margin-right: 5px;
    cursor: pointer;
}

.ia-radio-group {
    display: flex;
    gap: 4px;
}

.ia-radio-btn {
    padding: 6px 12px;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.ia-radio-btn:hover {
    background: #f7f7f8;
}

.ia-radio-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.ia-btn-send {
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.ia-btn-send:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.ia-btn-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== LOADING ANIMATION ===== */
.ia-message-loading {
    display: flex;
    gap: 6px;
    padding: 10px 0;
}

.ia-dot {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: dotPulse 1.4s infinite ease-in-out;
}

.ia-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.ia-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== ADMIN MODAL ===== */
.ia-admin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
}

.ia-admin-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    padding: 24px;
    width: 600px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 10002;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.ia-admin-modal h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
}

.ia-admin-section {
    margin-bottom: 24px;
}

.ia-admin-section h4 {
    font-size: 14px;
    color: #666;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ia-admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ia-admin-table th,
.ia-admin-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
}

.ia-admin-table th {
    background: #f7f7f8;
    font-weight: 600;
    color: #666;
}

.ia-admin-table td:last-child {
    text-align: center;
}

.ia-btn-delete-source {
    background: #fee2e2;
    border: none;
    color: #dc2626;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.ia-btn-delete-source:hover {
    background: #fecaca;
}

.ia-admin-actions {
    display: flex;
    gap: 10px;
}

.ia-admin-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid #e5e5e5;
}

/* ===== SCROLLBAR ===== */
.ia-conversations-list::-webkit-scrollbar,
.ia-messages-container::-webkit-scrollbar {
    width: 6px;
}

.ia-conversations-list::-webkit-scrollbar-track,
.ia-messages-container::-webkit-scrollbar-track {
    background: transparent;
}

.ia-conversations-list::-webkit-scrollbar-thumb,
.ia-messages-container::-webkit-scrollbar-thumb {
    background: #d1d1d6;
    border-radius: 3px;
}

.ia-conversations-list::-webkit-scrollbar-thumb:hover,
.ia-messages-container::-webkit-scrollbar-thumb:hover {
    background: #b1b1b6;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .ia-chat-container {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .ia-sidebar {
        position: absolute;
        left: -280px;
        height: 100%;
        transition: left 0.3s;
        z-index: 10;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .ia-sidebar.mobile-open {
        left: 0;
    }

    .ia-message-bubble {
        max-width: 85%;
    }

    .ia-input-wrapper {
        flex-direction: column;
    }

    .ia-btn-send {
        width: 100%;
    }

    .ia-input-options {
        flex-direction: column;
        gap: 8px;
    }

    .ia-chat-header {
        padding: 15px 20px;
    }

    .ia-messages-container {
        padding: 20px;
    }

    .ia-input-area {
        padding: 15px 20px;
    }
}

@media (max-width: 1024px) {
    .ia-chat-container {
        width: 98%;
        height: 95%;
    }

    .ia-sidebar {
        width: 250px;
    }
}

.ia-variable-choice {
    text-align: center;
    padding: 10px;
}

.ia-choice-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.ia-choice-btn {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f5f5f5;
    cursor: pointer;
    transition: all 0.2s;
}

.ia-choice-btn:hover {
    background: #e0e0e0;
    border-color: #aaa;
}

.ia-choice-btn i {
    margin-right: 8px;
}

.ia-api-keys-form {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}

.ia-form-group {
    margin-bottom: 12px;
}

.ia-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.ia-input-key {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
}

.ia-input-key:focus {
    border-color: #007bff;
    outline: none;
}
.ia-btn-keys {
    background: #f0f0f0;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    color: #666;
}

.ia-btn-keys:hover {
    background: #e0e0e0;
    color: #333;
}
.ia-quota-fill.mistral {
    background: linear-gradient(90deg, #ff7000, #ff9500);
}
.ia-btn-micro {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    font-size: 16px;
    transition: all 0.2s;
}

.ia-btn-micro:hover {
    color: #333;
}

.ia-btn-micro.recording {
    color: #e74c3c;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.ia-input-container {
    display: flex;
    align-items: center;
    flex: 1;
}

.ia-input-container .ia-input {
    flex: 1;
}
.ia-empty-state-examples {
    text-align: left;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 20px 0;
    max-width: 400px;
}

.ia-empty-state-examples p {
    margin: 0 0 10px 0;
    font-weight: bold;
    color: #666;
}

.ia-empty-state-examples ul {
    margin: 0;
    padding-left: 20px;
}

.ia-empty-state-examples li {
    color: #555;
    margin-bottom: 8px;
    cursor: pointer;
    transition: color 0.2s;
}

.ia-empty-state-examples li:hover {
    color: #007bff;
}


/* Message actions */
.ia-message-actions {
    display: inline-flex;
    gap: 5px;
    margin-left: 10px;
}

.ia-message-actions button {
    background: none;
    border: none;
    padding: 3px 6px;
    cursor: pointer;
    color: #999;
    font-size: 12px;
    border-radius: 3px;
}

.ia-message-actions button:hover {
    background: #f0f0f0;
    color: #333;
}


/* Form row pour couleur et ordre */
.ia-form-row {
    display: flex;
    gap: 15px;
}

.ia-form-group-large {
    flex: 1;
}

.ia-form-group-small {
    width: 100px;
}


/* Feedback buttons */
.ia-btn-feedback-positif, .ia-btn-feedback-negatif {
    background: none;
    border: none;
    padding: 3px 8px;
    cursor: pointer;
    color: #999;
    font-size: 14px;
    border-radius: 3px;
    transition: all 0.2s;
}

.ia-btn-feedback-positif:hover {
    color: #27ae60;
    background: #e8f5e9;
}

.ia-btn-feedback-negatif:hover {
    color: #e74c3c;
    background: #ffebee;
}

.ia-btn-feedback-positif.active {
    color: #27ae60;
}

.ia-btn-feedback-negatif.active {
    color: #e74c3c;
}

.ia-btn-feedback-positif:disabled, .ia-btn-feedback-negatif:disabled {
    opacity: 0.5;
    cursor: default;
}

.ia-feedback-separator {
    color: #ddd;
    margin: 0 5px;
}

/* Feedback Modal */
.ia-feedback-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ia-feedback-modal {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 450px;
    overflow: hidden;
}

.ia-feedback-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ia-feedback-header h3 {
    margin: 0;
    font-size: 16px;
}

.ia-feedback-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.ia-feedback-body {
    padding: 20px;
}

.ia-feedback-options {
    margin-bottom: 15px;
}

.ia-feedback-options label {
    display: block;
    padding: 8px 10px;
    margin-bottom: 5px;
    background: #f8f9fa;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

.ia-feedback-options label:hover {
    background: #e9ecef;
}

.ia-feedback-options input {
    margin-right: 10px;
}

.ia-feedback-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

.ia-feedback-footer button {
    margin-left: 10px;
}
/* Suggestions de questions */
.ia-suggestions {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
}

.ia-suggestions-label {
    display: block;
    font-size: 11px;
    color: #888;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ia-suggestion-btn {
    display: inline-block;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: #667eea;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    margin: 4px 4px 4px 0;
    cursor: pointer;
    transition: all 0.2s ease;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ia-suggestion-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-1px);
}
```

**Résultat :**

Après chaque réponse, l'utilisateur verra :
```
┌─────────────────────────────────────────────────────┐
│ [Réponse de l'assistant...]                         │
│                                                     │
│ ─────────────────────────────────────────────────── │
│ QUESTIONS SIMILAIRES :                              │
│ ┌──────────────────┐ ┌──────────────────────────┐   │
│ │ Comment inscrire │ │ Comment créer un formateur│  │
│ │ un formateur ?   │ │ externe ?                 │  │
│ └──────────────────┘ └──────────────────────────┘   │
└─────────────────────────────────────────────────────┘