/* Style pour les options CoT dans les paramètres avancés */
#enableCoT, #includeReasoning {
    accent-color: #3498db;
    transform: scale(1.1);
    transition: all 0.2s ease;
}

#enableCoT:checked, #includeReasoning:checked {
    accent-color: #3498db;
}

#enableCoT:hover, #includeReasoning:hover:not(:disabled) {
    transform: scale(1.2);
}

/* Animation pour le statut CoT */
#cotStatus {
    animation: slideIn 0.3s ease;
}

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

/* Message CoT dans le flux de conversation */
                .message.cot-step {
                    background: #F1F3F5;
                    border-left: 3px solid #99a0aaff;
                    margin: 10px 20px;
                    padding: 15px;
                    border-radius: 8px;
                    animation: slideInLeft 0.3s ease;
                }

                @keyframes slideInLeft {
                    from {
                        opacity: 0;
                        transform: translateX(-20px);
                    }
                    to {
                        opacity: 1;
                        transform: translateX(0);
                    }
                }

                .cot-step-header {
                    display: flex;
                    align-items: center;
                    gap: 12px;
                    margin-bottom: 10px;
                }

                .cot-step-number {
                    background: #3B4757;
                    color: white;
                    width: 32px;
                    height: 32px;
                    border-radius: 50%;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    font-weight: bold;
                    font-size: 14px;
                }

                .cot-step-content {
                    flex: 1;
                }

                .cot-step-title {
                    font-weight: 600;
                    color: #333;
                    font-size: 15px;
                    margin-bottom: 5px;
                }

                .cot-step-description {
                    color: #666;
                    font-size: 14px;
                    line-height: 1.5;
                }

                .cot-confidence {
                    display: flex;
                    align-items: center;
                    gap: 8px;
                    margin-left: auto;
                }

                .confidence-bar {
                    width: 80px;
                    height: 8px;
                    background: #e0e0e0;
                    border-radius: 4px;
                    overflow: hidden;
                }

                .confidence-fill {
                    height: 100%;
                    background: linear-gradient(90deg, #ff6b6b, #ffd93d, #6bcf7f);
                    transition: width 0.3s ease;
                }

                .confidence-label {
                    font-size: 13px;
                    color: #666;
                    font-weight: 600;
                }

                /* Message de début CoT */
                .message.cot-start {
                    background: #F1F3F5;
                    margin: 15px 20px;
                    padding: 12px 20px;
                    border-radius: 8px;
                    display: flex;
                    align-items: center;
                    gap: 10px;
                }

                .cot-start-icon {
                    font-size: 24px;
                    animation: pulse 2s infinite;
                }

                @keyframes pulse {
                    0%, 100% { opacity: 1; }
                    50% { opacity: 0.6; }
                }

                .cot-start-text {
                    color: #3B4757;
                    font-weight: 600;
                    font-size: 14px;
                }

                /* Message de conclusion CoT */
                .message.cot-conclusion {
                    background: linear-gradient(135deg, #6bcf7f20 0%, #4caf5020 100%);
                    border: 1px solid #4caf5040;
                    margin: 15px 20px;
                    padding: 15px 20px;
                    border-radius: 8px;
                }

                .cot-conclusion-header {
                    display: flex;
                    align-items: center;
                    gap: 10px;
                    margin-bottom: 10px;
                    color: #2e7d32;
                    font-weight: 600;
                }

                .cot-conclusion-content {
                    color: #333;
                    line-height: 1.6;
                }

                /* Métriques CoT */
                .cot-metrics {
                    display: flex;
                    gap: 20px;
                    margin-top: 15px;
                    padding-top: 15px;
                    border-top: 1px solid #4caf5030;
                }

                .cot-metric {
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                }

                .cot-metric-value {
                    font-size: 20px;
                    font-weight: bold;
                    color: 2196F3;
                }

                .cot-metric-label {
                    font-size: 12px;
                    color: white;
                    margin-top: 4px;
                }

                /* Animation de chargement */
                .cot-loading-step {
                    opacity: 0.6;
                    animation: fadeInOut 1.5s infinite;
                }

                @keyframes fadeInOut {
                    0%, 100% { opacity: 0.6; }
                    50% { opacity: 1; }
                }

                /* Masquer le typing indicator pendant CoT */
                .messages-area.cot-active .typing-indicator {
                    display: none !important;
                }